<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" pageEncoding="UTF-8" import="java.util.*"%>
<%@ include file="/pages/safeai/jsp/common/taglibs.jsp"%>
<%
	Date d = new Date();
	Long time = d.getTime();
%>
<html>
<head>
<title>品牌管理</title>
<script type="text/javascript" src="${ctx}/script/common.js"></script>
<script type="text/javascript" src="${ctx}/script/product/Brand.js"></script>
<link href="${ctx}/css/safeai/together.css" rel="stylesheet" type="text/css">
<%@ include file="/pages/safeai/jsp/common/meta.jsp"%>
</head>
  <body>
    <html:form method="post" action="/brand/brandMessage" enctype="multipart/form-data" onsubmit="return checkBrand();">
      <table align="center" width="500px">
	    <logic:present name="brand">
	    	<input type="hidden" name="method" value="updateBrand"/>
	    	<input type="hidden" name="brand.id" value="${brand.id}"/>
	    	<tr>
	    		<th colspan="2" class="td_01" height="25px">修改品牌</th>
	    	</tr>
	    </logic:present>
	    <logic:notPresent name="brand">
	    	<input type="hidden" name="method" value="addBrand"/>
	    	<tr>
	    		<th colspan="2" class="td_01" height="25px">添加品牌</th>
	    	</tr>
	    </logic:notPresent>
	    
	    <tr>
	    	<td class="td_01">名称：</td>
	    	<td class="td_04"><input type="text" name="brand.bname" value="${brand.bname}" maxlength="25" id="brand.bname" /></td>
	    </tr>
		<tr>
	    	<td class="td_01">英文名称：</td>
	    	<td class="td_04"><input type="text" name="brand.enName" id="brand.enName"  value="${brand.enName }" maxlength="25"/></td>
	    </tr>
		<tr>
	    	<td class="td_01">状态：</td>
	    	<td class="td_04">
				<select name="brand.status">
					<logic:present name="brand">
						<option value="1">正常状态</option>
						<option value="0" <logic:notEqual name="brand" property="status" value="1">selected</logic:notEqual>>暂停状态</option>
					</logic:present>
					<logic:notPresent name="brand">
						<option value="1">正常状态</option>
						<option value="0">暂停状态</option>
					</logic:notPresent>
				</select>			</td>
	    </tr>
		<tr >
	    	<td class="td_01">顺序：</td>
	    	<td class="td_04">
				<input type="text" name="brand.sequence" id="brand.sequence" value="${brand.sequence }" /></td>
	    </tr>
		<tr>
	    	<td class="td_01">图片：</td>
	    	<td class="td_04">
	    		<a href="javaScript:void(0);"> <img height="80" src="${ctx}${brand.imagedesc}?time=<%=time%>" width="80" /></a>&nbsp;&nbsp;<span style="color:red;">注：图片尺寸： 500*500,格式为：.JPG,大小为：10Mb</span><br>
	    		<input type="file" name="brand.imageFile" onkeypress="alert('不允许手工填写'); window.event.returnValue=false;"/>
	    		<input type="hidden" value="${brand.imagedesc}" name="oldImage" />
	    		
	    	</td>
	    	<input type="hidden" value="${brand.imagedesc}" name="oldImage"/>
	    </tr>
	    <tr><td colspan="2"><font color="red">${fileBrand }</font></td></tr>
	    <tr>
			<TD colspan="2" align="center">
			<input type="submit" value="提交" class="btn"/>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			 <input type="button" class="btn" value="返回" onClick="javascript:history.go(-1);" ;  style="border: 1 solid #000000" />			
            </td>
		</tr>
		</table>
	</html:form>
  </body>
</html>
